Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactor of config classes a and config include logic #214

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

nat-n
Copy link
Owner

@nat-n nat-n commented Apr 20, 2024

BREAKING CHANGE: included config now loads envfiles relative to the cwd specified on the include option (if any).

New/updated special env vars:

  • POE_CONF_DIR: the path to the dir containing the config file that defines the running task or the cwd set when including the config
  • POE_DEBUG makes poe print more stuff to help with debugging

Refactor specifics:

  • Introduce PoeOptions class for deserializing config. I would have used pydantic but it's too heavy for use in a CLI tool like this.
  • Keep config from different files separate within PoeConfig
  • Collect config validation logic in the config classes and declare config types in more detail
  • Make error reporting more structured and consistent

Also:

  • Fixed bug that caused some task validation to be skipped for tasks with args
  • Improve consistency and coverage for config validation
  • Fix crash in switch with args naked string for control
  • PoeConfig.load will load everything again if called a second time
  • remove pylint from the project
  • Enable ANSI color output by default inside GitHub Actions

**BREAKING CHANGE:** included config now loads envfiles relative to the cwd
specified on the include option (if any).

New/updated special env vars:
- POE_CONF_DIR: the path to the dir containing the config file that defines the
  running task or the cwd set when including the config
- POE_DEBUG makes poe print more stuff to help with debugging

Refactor specifics:
- Introduce PoeOptions class for deserializing config. I would have used
  pydantic but it's too heavy for use in a CLI tool like this.
- Keep config from different files separate within PoeConfig
- Collect config validation logic in the config classes and declare config types
  in more detail
- Make error reporting more structured and consistent

Also:
- Fixed bug that caused some task validation to be skipped for tasks with args
- Improve consistency and coverage for config validation
- Fix crash in switch with args naked string for control
- PoeConfig.load will load everything again if called a second time
- remove pylint from the project
- Enable ANSI color output by default inside GitHub Actions
@nat-n nat-n merged commit 583e12b into development Apr 20, 2024
38 checks passed
@nat-n nat-n deleted the refactor_tasks branch April 27, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant